# -*- coding: utf-8 -*-
# @Time : 2022/1/6 14:14
# @Author : Limusen
# @File : unittest_demo_20

import os
import unittest

case_path = os.path.dirname(os.path.abspath(__file__))


def get_all_case():
    discover = unittest.defaultTestLoader.discover(start_dir=case_path,# 测试用例的地址
                                                   pattern="unittest_demo_20.py", # 以什么样的文件名去搜索
                                                   top_level_dir=None)
    suite = unittest.TestSuite()
    suite.addTest(discover)
    return suite


if __name__ == '__main__':
    suite = get_all_case()
    unittest.main(defaultTest="suite")
